/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Core;

import java.util.ArrayList;
import java.util.List;
import model.Employee;
import model.Processowner;
import model.Seller;
import org.hibernate.Query;
import org.hibernate.Session;
import util.IsisHibernateUtil;

/**
 *
 * @author phinguyen
 */
public class ConnexionCore {
    private static Session session;
    private ArrayList<Seller> lstseller;
    private ArrayList<Processowner> lstPowner;
    private ArrayList<Employee> lstEmployee;
    public ConnexionCore() {
        session = IsisHibernateUtil.getSessionFactory().openSession();
        lstEmployee= new ArrayList<>();
        lstPowner= new ArrayList<>();
        lstseller=new ArrayList<>();
        }
    public List getlstEmp(){
        Query query = session.getNamedQuery("HQL_ALL_EMPLOYEE");
        
        return query.list();
        
    }
}
